﻿using System;

namespace jQueryLib
{
    public partial class JQueryInstance
    {
        /// <summary>
        /// Trigger blur event on an element.
        /// </summary>
        public abstract JQueryInstance Blur();

        /// <summary>
        /// Bind an event handler to the "blur" JavaScript event
        /// </summary>
        /// <param name="handler"></param>
        public abstract JQueryInstance Blur(Action<object> handler);

        /// <summary>
        /// trigger focus event on an element.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance Focus();

        /// <summary>
        /// Bind an event handler to the "focus" JavaScript event
        /// </summary>
        /// <param name="handler"></param>
        /// <returns></returns>
        public abstract JQueryInstance Focus(Action<object> handler);

        /// <summary>
        /// trigger change event on an element.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance Change();

        /// <summary>
        /// Bind an event handler to the "change" JavaScript event
        /// </summary>
        /// <param name="handler"></param>
        /// <returns></returns>
        public abstract JQueryInstance Change(Action<object> handler);

        /// <summary>
        /// trigger select event on an element
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance Select();

        /// <summary>
        /// Bind an event handler to the "select" JavaScript event
        /// </summary>
        /// <param name="handler"></param>
        /// <returns></returns>
        public abstract JQueryInstance Select(Action<object> handler);

        /// <summary>
        /// trigger submit event on an element
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance Submit();

        /// <summary>
        /// Bind an event handler to the "submit" JavaScript event
        /// </summary>
        /// <param name="handler"></param>
        /// <returns></returns>
        public abstract JQueryInstance Submit(Action<object> handler);

        /// <summary>
        /// Encode a set of form elements as a string for submission.
        /// </summary>
        /// <returns></returns>
        public abstract string Serialize();

        /// <summary>
        /// Encode a set of form elements as an array of names and values.
        /// </summary>
        /// <returns></returns>
        public abstract string SerializeArray();
    }
}
